pr=[]
import sys
def is_prime(n):
    if n <= 1:
        return False
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            return False
    return True
for i in range(sys.maxsize):
    if len(pr)==26:
        break
    if is_prime(i):
        pr.append(i)


a,b = input().split()
a = a.split(",")
b = b.split(",")
a.reverse()
b.reverse()
aa = [a[i] if i<len(a) else 0 for i in range(26)]
bb = [b[i] if i<len(b) else 0 for i in range(26)]
cc = [0 for x in range(26)]

def k_o(x:list,k)->int:
    v = 0
    for i in range(len(x)):
        v += int(x[i]) * (k**i)
    return v

def o_k(x:int,k)->list:
    v=[]
    r = 0
    for i in range(len(x)):
        r = x % k
        v.append(r)
        x //= r
    v.reverse()
    return v
flag = 0
for i in range(26):
    v = int(aa[i]) + int(bb[i])+flag
    flag = 0
    if (v // pr[i])==1:
        flag = 1
    cc[i]= v % pr[i]

cc.reverse()
while cc and cc[0]==0:
    cc.pop(0)

print(",".join(map(str,cc)))
